<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
        <title>Document</title>
        <script>
            /* 
                构造函数
             */
             function Person(name, sex){
                 this.name = name;
                 this.sex = sex;
             }
             Person.prototype.showName = function(){
                 alert("我的名字叫" + this.name);
                 return this;
             }
             Person.prototype.showSex = function(){
                 alert("我的性别是" + this.sex);
                 return this;
             }

             

             function $(name, sex){
                 return new Person(name, sex);
             }

            //  var p1 = new Person("blue", "男");

            // var p1 = $("blue", "男");
             /* var res = p1.showName();
             res.showSex(); */

             
             $("blue", "男").showName().showSex().showName().showSex();
            /*  $("red", "女").showName().showSex();

             $("#div1").click().css().attr() */
            
        </script>
    </head>
    <body>
        
    </body>
</html>